
<template>
  <div class="page-login">
    <LoginHeader />
    <section class="login-section">
      <div class="wrapper">
        <nav>
          <a href="javascript:;">账户登录</a>
        </nav>
        <LoginForm />
      </div>
    </section>
    <LoginFooter />
  </div>
</template>
<script>
import LoginHeader from './components/header'
import LoginFooter from './components/footer'
import LoginForm from './components/form'

// import { ref, watch } from 'vue'
export default {
  name: 'PageLogin',
  components: {
    LoginHeader,
    LoginFooter,
    LoginForm
  }
  // setup (props, { emit }) {
  //   const checked = ref(false)
  //   const check = () => {
  //     // 每次点击取值和上次相反(取反)
  //     checked.value = !checked.value
  //     // 同步v-model的值(子传父 )
  //     emit('update:modelValue', checked.value)
  //   }
  //   // 同步v-model绑定值的变化(父传子)
  //   watch(() => props.modelValue, (newValue) => {
  //     checked.value = newValue
  //   }, { immediate: true })
  //   return { checked, check }
  // }
}
</script>
<style scoped lang="less">
.login-section {
  background: url(../../assets/images/login-bg.png) no-repeat center / cover;
  height: 488px;
  position: relative;
  .wrapper {
    width: 380px;
    background: #fff;
    position: absolute;
    left: 50%;
    top: 54px;
    transform: translate3d(100px, 0, 0);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    nav {
      font-size: 14px;
      height: 55px;
      margin-bottom: 20px;
      border-bottom: 1px solid #f5f5f5;
      display: flex;
      padding: 0 40px;
      text-align: right;
      align-items: center;
      a {
        flex: 1;
        line-height: 1;
        display: inline-block;
        font-size: 18px;
        position: relative;
        text-align: center;
      }
    }
  }
}
</style>
